package chap04;

public abstract class Animal {
    private  String name;

    public Animal() {
    }

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public abstract void shout();
    public void eat(Food food){
        System.out.println(this.name+"在吃"+food.getName());

    }
}


